To Request a Code Review

This topic is for Microsoft Team Foundation Server (TFS) users who share code in the development of RFgen applications and perform code reviews before the change if made official (put into the master/source database) in TFS.

To request a new code review, the change must be made on an object that is CHECKED OUT to YOU. You can also select multiple objects.

For example, Cindy wants to delete an application from the Solution Explorer > Applications folder, but wants Murphy to review her change first.

First Cindy selects the application (with Lock status), deletes it from the right-click menu, then marks it with "New Code Review" from the right-click menu.

As soon as she deletes it, TFS checks out the application, and places the application in a Pending Delete State. This prevents other TFS users from making changes against the application until the application is Checked In or the review is cancelled via an Undo Checkout.

Next, Cindy assigns the review to Murphy in the the Source Control Code Review Request screen. (The application is still in a Checked Out state with a pending status of "delete.")

Finally, Cindy unchecks the Undo Checkout after creating Code Review Request and clicks OK.

Murphy receives a review request via email (if its configured in TFS) and sees the change in his Visual Studio. The application won't delete until Murphy (or another user with access to the TFS server) checks the change back into TFS.

If Cindy doesn't want to the pending delete as part of the code review request she can simply uncheck the box in the Source Control Code Review Request- Code review column.

Alternatively, if there were a bunch of changes that are pending, Cindy can remove all the changes in the local TFS Workspace after creating the request by keeping the Undo Checkout after creating Code Review Request box checked.

 

Source Control Code Review Request Descriptions

    * Code Review - if checked indicates this object was selected for review. If unchecked, this will lose the pending changes and keep the object checked in.
    * Table column - lists the type of Solution Explorer object (i.e. Application, Transaction etc.).
    * Item column - lists the name of the object.
    * Pendent Status - lists the TFS status of the object change as soon as its Checked Out (when you tap OK).

    * Reviewer - the person to review the code. Reviewer should be someone with access to the TFS server. Format is "domain\username".
    * Code Review Request Name - the unique name for the change/changes to be reviewed and made in TFS.
    * Comments box - this field is optional. Its the information about the request/pending review.
    * Undo Checkout after creating Code Review Request box - The default is checked. Checked cancels all changes and puts all the checked objects back into a Checked In state. Unchecked allows the review request and pending status to execute.